#coding=utf-8
import os
import logging
i = 'baidu88575.com'
if os.system('ping '+i) == 1:
    logging.basicConfig(filename='D:/demo/error.log', filemode='w', level=logging.DEBUG)
    logging.debug('request time out '+i)
    logging.info('So should this')
    logging.warning('And this, too')

